/*
 * ScheduledCourse.java
 *
 * Created on April 24, 2007, 6:51 PM
 */

package CSIS543TFinalProject;

/**
 this little class is just a data holder, so we don't pollute the Course class
 with schedule data. Each Plan object contains a list of this data.
 
 @author dwight fellman
 */
public class ScheduledCourse {
   private String courseName;
   private Session session;

   /**
    create a new ScheduledCourse given just the Course name. This is common when
    creating a new Plan: the Session isn't known yet.
    */
   public ScheduledCourse(String name) {
      this.courseName = name;
      this.session = null;
   }

   public boolean equals(Object obj) {
      ScheduledCourse sc = (ScheduledCourse) obj;
      boolean b = (this.courseName.equals(sc.courseName) && this.session == sc.session);
      return b;
   }   
   
   /**
    create a new ScheduledCourse if we know the Course name and Session.
    */
   public ScheduledCourse(String name, Session session) {
      this.courseName = name;
      this.session = session;
   }

   public String getCourseName() {
      return courseName;
   }

   public void setCourseName(String courseName) {
      this.courseName = courseName;
   }

   public Session getSession() {
      return session;
   }

   public void setSession(Session session) {
      this.session = session;
   }
}
